<?php

namespace App\Model\Business;

use App\Model\Model;

class ChannelCode extends Model
{
    protected ?string $connection = "business";

    protected ?string $table = "channel_code";

    public static function findChannelTypeByChannel($channel)
    {
        return self::query()->where("channel", $channel)->firstOrFail()->value("channel_type");
    }
}